#!/bin/sh
#em:9416,cdrdis:8380
#net_dev=ens32
net_dev=lo
my_port=48209
my_port=8380
my_port=8395

if [  -n "$1" ];then
  my_port=$1
fi

filename=`date +%Y%m%d_%H_%M_%S`.${my_port}.pcap

#sudo tcpdump -vv -w $filename -i $net_dev -s 0 host 127.0.0.1 and port $my_port
#sudo tcpdump -w $filename -i $net_dev -s0 host 127.0.0.1 and port 3900
echo "sudo tcpdump -vv -w $filename -i $net_dev -s 0  port $my_port"
sudo tcpdump -vv -w $filename -i $net_dev -s 0  port $my_port
